<template>
  <div class="content">
    <h2>首页</h2>
  </div>
  <van-tabbar v-model="active">
    <van-tabbar-item icon="home-o">标签</van-tabbar-item>
    <van-tabbar-item icon="search">标签</van-tabbar-item>
    <van-tabbar-item to="/user/index" icon="friends-o">用户</van-tabbar-item>
    <van-tabbar-item to="/login" icon="setting-o">登录</van-tabbar-item>
  </van-tabbar>
</template>

<script>
import {ref} from 'vue';

export default {
  setup() {
    const active = ref(0);
    return {active};
  },
};
</script>
<style lang="less">
.content {
  h2 {
    font-size: 2rem;
    text-align: center;
  }
}
</style>